package com.xja.food.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.xja.food.entity.Users;
import com.xja.food.mapper.UsersMapper;
import com.xja.food.service.UserService;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @author 刘振升
 * @version 1.0
 * @date 2022/4/14 17:16
 * @description todo
 */
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UsersMapper usersMapper;
    @Override
    public Users login(Users users) {
        QueryWrapper<Users> qw = new QueryWrapper<>();
        qw.eq("uname",users.getUname());
        qw.eq("upwd",users.getUpwd());
        return usersMapper.selectOne(qw);
    }
}
